import {connect} from "react-redux"
import {increment, decrement} from '../../redux/actions/count2'

function Counter ({count2, increment, decrement}) {
    console.log(count2)
    return (
      <div>
        <button onClick={() => increment(31)}>+</button>
        <span>{count2.count2}</span>
        <button onClick={() => decrement(3)}>-</button>
      </div>
    );
  }
  export default connect((state) => ({count2:state.count2}), {increment, decrement})(Counter)